3.34 \(\int \frac{1}{\sqrt{a+b \cot ^2(c+d x)}} \, dx\)

Optimal. Leaf size=47 \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d \sqrt{a-b}} \]

[Out]

-(ArcTan[(Sqrt[a - b]*Cot[c + d*x])/Sqrt[a + b*Cot[c + d*x]^2]]/(Sqrt[a - b]*d))

________________________________________________________________________________________

Rubi [A]  time = 0.0329305, antiderivative size = 47, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {3661, 377, 203} \[ -\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d \sqrt{a-b}} \]

Antiderivative was successfully verified.

[In]

Int[1/Sqrt[a + b*Cot[c + d*x]^2],x]

[Out]

-(ArcTan[(Sqrt[a - b]*Cot[c + d*x])/Sqrt[a + b*Cot[c + d*x]^2]]/(Sqrt[a - b]*d))

Rule 3661

Int[((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x]
, x]}, Dist[(c*ff)/f, Subst[Int[(a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ
[{a, b, c, e, f, n, p}, x] && (IntegersQ[n, p] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rule 377

Int[((a_) + (b_.)*(x_)^(n_))^(p_)/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Subst[Int[1/(c - (b*c - a*d)*x^n), x]
, x, x/(a + b*x^n)^(1/n)] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && EqQ[n*p + 1, 0] && IntegerQ[n]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{\sqrt{a+b \cot ^2(c+d x)}} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \sqrt{a+b x^2}} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{1-(-a+b) x^2} \, dx,x,\frac{\cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{d}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{a-b} \cot (c+d x)}{\sqrt{a+b \cot ^2(c+d x)}}\right )}{\sqrt{a-b} d}\\ \end{align*}

Mathematica [B]  time = 0.418421, size = 111, normalized size = 2.36 \[ -\frac{\cot (c+d x) \sqrt{\frac{b \cot ^2(c+d x)}{a}+1} \tanh ^{-1}\left (\frac{\sqrt{-\frac{(a-b) \cot ^2(c+d x)}{a}}}{\sqrt{\frac{b \cot ^2(c+d x)}{a}+1}}\right )}{d \sqrt{-\frac{(a-b) \cot ^2(c+d x)}{a}} \sqrt{a+b \cot ^2(c+d x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[1/Sqrt[a + b*Cot[c + d*x]^2],x]

[Out]

-((ArcTanh[Sqrt[-(((a - b)*Cot[c + d*x]^2)/a)]/Sqrt[1 + (b*Cot[c + d*x]^2)/a]]*Cot[c + d*x]*Sqrt[1 + (b*Cot[c
+ d*x]^2)/a])/(d*Sqrt[-(((a - b)*Cot[c + d*x]^2)/a)]*Sqrt[a + b*Cot[c + d*x]^2]))

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 68, normalized size = 1.5 \begin{align*} -{\frac{1}{d{b}^{2} \left ( a-b \right ) }\sqrt{{b}^{4} \left ( a-b \right ) }\arctan \left ({ \left ( a-b \right ){b}^{2}\cot \left ( dx+c \right ){\frac{1}{\sqrt{{b}^{4} \left ( a-b \right ) }}}{\frac{1}{\sqrt{a+b \left ( \cot \left ( dx+c \right ) \right ) ^{2}}}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cot(d*x+c)^2)^(1/2),x)

[Out]

-1/d*(b^4*(a-b))^(1/2)/b^2/(a-b)*arctan(b^2*(a-b)/(b^4*(a-b))^(1/2)/(a+b*cot(d*x+c)^2)^(1/2)*cot(d*x+c))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cot(d*x+c)^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 2.14564, size = 558, normalized size = 11.87 \begin{align*} \left [-\frac{\sqrt{-a + b} \log \left (-2 \,{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )^{2} - 2 \,{\left ({\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b\right )} \sqrt{-a + b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right ) + a^{2} - 2 \, b^{2} + 4 \,{\left (a b - b^{2}\right )} \cos \left (2 \, d x + 2 \, c\right )\right )}{4 \,{\left (a - b\right )} d}, -\frac{\arctan \left (-\frac{\sqrt{a - b} \sqrt{\frac{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - a - b}{\cos \left (2 \, d x + 2 \, c\right ) - 1}} \sin \left (2 \, d x + 2 \, c\right )}{{\left (a - b\right )} \cos \left (2 \, d x + 2 \, c\right ) - b}\right )}{2 \, \sqrt{a - b} d}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cot(d*x+c)^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/4*sqrt(-a + b)*log(-2*(a^2 - 2*a*b + b^2)*cos(2*d*x + 2*c)^2 - 2*((a - b)*cos(2*d*x + 2*c) - b)*sqrt(-a +
b)*sqrt(((a - b)*cos(2*d*x + 2*c) - a - b)/(cos(2*d*x + 2*c) - 1))*sin(2*d*x + 2*c) + a^2 - 2*b^2 + 4*(a*b - b
^2)*cos(2*d*x + 2*c))/((a - b)*d), -1/2*arctan(-sqrt(a - b)*sqrt(((a - b)*cos(2*d*x + 2*c) - a - b)/(cos(2*d*x
 + 2*c) - 1))*sin(2*d*x + 2*c)/((a - b)*cos(2*d*x + 2*c) - b))/(sqrt(a - b)*d)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a + b \cot ^{2}{\left (c + d x \right )}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cot(d*x+c)**2)**(1/2),x)

[Out]

Integral(1/sqrt(a + b*cot(c + d*x)**2), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{b \cot \left (d x + c\right )^{2} + a}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cot(d*x+c)^2)^(1/2),x, algorithm="giac")

[Out]

integrate(1/sqrt(b*cot(d*x + c)^2 + a), x)